πŸ•ΈοΈ Ada Research Browser

phase6-ui-datapact-sync.md
← Back

Plan: phase6/ui-datapact-sync β€” DataPact Sync UI

Overview

Add sync UI to the assessment workspace so users can sync individual practices or bulk-sync all practices with DataPact, see sync status indicators, and view sync logs.

Components

1. DataPactSyncPanel (ui/src/modules/datapact/DataPactSyncPanel.tsx)

Collapsible panel added to WorkspacePracticeDetail below Evidence. Shows: - Current sync status badge for the selected practice (datapact_sync_status / datapact_sync_at) - "Sync This Practice" button β€” calls syncPractice(assessmentId, practiceId) - Inline result feedback (success/error message after sync)

2. SyncAllButton in workspace header

Added to AssessmentWorkspacePage header next to status transition buttons. - "Sync All" button β€” calls syncAssessment(assessmentId) - Shows progress: "Syncing..." β†’ result summary toast - On completion, refreshes evaluations to pick up datapact_sync_status updates

3. DataPactSyncLogViewer (ui/src/modules/datapact/DataPactSyncLogViewer.tsx)

A collapsible section at the bottom of the sync panel or a separate tab. Shows: - Recent sync logs for the current assessment (via getSyncLogs({ assessment_id })) - Columns: practice_id, status, error_message, timestamp - Auto-refreshes after sync operations

4. Sync status indicators in practice list

Update WorkspacePracticeList to show a small sync status icon next to each practice: - Green dot = synced - Red dot = error - No dot = never synced

Changes to Existing Files

Test Plan